import logging

import yagmail


class Logg():
    logging.basicConfig(filename='log.txt', filemode='w+', level=logging.DEBUG
                        , format='%(levelno)s->%(filename)s->%(asctime)s->%(message)s')
def send_mail(files):
    ya=yagmail.SMTP(user='3974562803@qq.com',password='xxqhmxvushrqcbfh',host='smtp.qq.com')
    ya.send(to='maqiyun1234@qq.com',subject='fjwoi',contents='hello',attachments=files)